package com.alex.statistics.pojo.request.clusterAnalysis;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "层次聚类请求参数")
public class HierarchicalClusteringRequest {
    @Schema(description = "待聚类的数据集合，每个元素是一个特征向量", required = true,
            example = "[[1.2, 2.5], [3.7, 4.1], [5.9, 6.3], [7.2, 8.4]]")
    private List<double[]> data;

    @Schema(description = "聚类数量（当useThreshold为false时生效）", example = "3")
    private int k = 3;

    @Schema(description = "距离阈值（当useThreshold为true时生效）", example = "2.5")
    private double distanceThreshold = 0.0;

    @Schema(description = "是否使用距离阈值作为聚类停止条件", example = "false")
    private boolean useThreshold = false;

    @Schema(description = "距离度量方法", allowableValues = {"euclidean", "manhattan", "cosine"}, example = "euclidean")
    private String distanceMetric = "euclidean";
}    